using System;
using System.Collections.Generic;

namespace needle.Services.astra.Collections
{
	/// <summary>
	/// List supporting moving of items.
	/// </summary>
	/// <typeparam name="T">List item type.</typeparam>
	public interface IMoveItemList<T> : IList<T>
	{
		/// <summary>
		/// Moves the item at the specified index to a new location in the list.
		/// </summary>
		/// <param name="oldIndex">Index of item to be moved.</param>
		/// <param name="newIndex">Index of new target location of the item.</param>
		/// <exception cref="ArgumentOutOfRange">
		/// <paramref name="oldIndex"/> or <paramref name="newIndex"/> is invalid.
		/// </exception>
		void Move(int oldIndex, int newIndex);
	}
}
